<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath() + "/";
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户管理</title>
<meta
	content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
	name='viewport'>
<!-- bootstrap 3.0.2 -->
<link href="<%=path%>bootstrap/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<!-- font Awesome -->
<link href="<%=path%>bootstrap/css/font-awesome.min.css"
	rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="<%=path%>bootstrap/css/ionicons.min.css" rel="stylesheet"
	type="text/css" />
<!-- DATA TABLES -->

<!-- Theme style -->

<link href="<%=path%>bootstrap/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>css/jquery.dataTables.min.css">
<link type="text/css" rel="stylesheet"
	href="<%=path%>css/dataTables.tableTools.css" />
<link type="text/css" rel="stylesheet"
	href="<%=path%>css/dataTables.bootstrap.css" />
<link href="<%=path%>bootstrap/css/AdminLTE.css" rel="stylesheet"
	type="text/css" />


<script type="text/javascript" src="<%=path%>js/jquery.js"></script>

<script src="<%=path%>js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript"
	src="<%=path%>js/jquery.dataTables.min.js"></script>

<script src="<%=path%>js/common.js" type="text/javascript"></script>

<script src="<%=path%>js/syuser.js" type="text/javascript"></script>


</head>
<body class="skin-blue">
	<!-- Bootstrap -->




	<%@include file="../header.jsp"%>
	<!--静态包含-->
	<%@include file="../left.jsp"%>
	<!--静态包含-->

	<!-- Right side column. Contains the navbar and content of the page -->
	<aside class="right-side"> <!-- Content Header (Page header) -->
	<section class="content-header">
	<h1>
		权限管理 <small>用户管理</small>
	</h1>
	</section> <!-- Main content --> <section class="content">
	<div class="row">
		<div class="col-xs-12">


			<div class="box">
				<div class="box-header">

				</div>
				<!-- /.box-header -->

				<!-- <input type="button" value="新增" onclick="new()"> -->
				<div class="box-body table-responsive">
					<table id="example1" class="table table-bordered table-striped">
						<thead>
							<tr>
								<th><input type="checkbox" name="allChecked" /></th>
								<th>id</th>
								<th>用户名</th>
								<th>密码</th>
								<th>创建时间</th>
								<th>真实名字</th>
								<th>电话</th>
								<th>头像</th>
								<th>生日</th>
								<th>状态</th>
								<th>地址</th>
								<th>部门id</th>
								<th>邮箱</th>
								<th>职务</th>
								<th>操作</th>
							</tr>
						</thead>
					</table>
				</div>
			</div>
		</div>
	</div>




	</section><!-- /.content --> </aside>
	<!-- /.right-side -->
	</div>
	<!-- ./wrapper -->





	<!--单个删除确认对话框-->
	<div class="modal fade" id="deleteOneModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<!-- data-backdrop="static" 禁止点击弹框后面内容 -->
		<form class="form-horizontal" role="form">
			<div class="modal-dialog modal-sm ">
				<!-- modal-sm 小的  modal-lg 大的 -->
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">提示信息</h4>
					</div>
					<div class="modal-body" style="text-align: left;">
						<h5>您确定要删除当前信息吗？</h5>
					</div>
					<div class="modal-footer">
						<!-- 
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">取消
                    </button>
                     -->
						<button type="button" class="btn btn-primary" id="delSubmit">
							确认</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
		</form>
	</div>


	<!--多个删除确认对话框-->
	<div class="modal fade" id="deleteAllModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<form class="form-horizontal" role="form">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">提示信息</h4>
					</div>
					<div class="modal-body" style="text-align: left;">
						<h5>您确定要删除选中信息吗？</h5>
					</div>
					<div class="modal-footer">
						<!-- 
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">取消
                    </button>
                     -->
						<button type="button" class="btn btn-primary" id="delAllSubmit">
							确认</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
		</form>
	</div>



	<!--新增页面开始-->
	<div class="modal fade" id="myModal-add-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">新 增</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="insertSyuseradd">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">名称：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="nameid" name="name"
									style="width: 250px" maxlength="30" placeholder="10个汉字以内" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">密码：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="password" id="passwordid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">创建时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="createtime" id="createtimeid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">真实名字：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="realname" id="realnameid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">电话：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="phone"
									id="phoneid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">头像：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="camera" id="cameraid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">生日：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="birthday" id="birthdayid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">职务：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="zw"
									id="zwid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">状态：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="state"
									id="stateid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">邮箱：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="email"
									id="emailid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">地址：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="address" id="addressid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">部门id：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="bm"
									id="bmid" style="width: 250px" maxlength="30" />
							</div>
						</div>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="syuseraddzeng()">提交</button>
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>





	<!-- 给用户添加角色 -->
	<div class="modal fade" id="myModal-addrole-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">添加角色</h4>
				</div>


				<div class="box-body table-responsive">
					<form action="" method="post">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">用户编号：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="userid" id="userid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">角色名称：
							</label>

							<div class="col-sm-9">
								<c:forEach items="${sessionScope.rolelist }" var="role">
									<input type="checkbox" value="${role.id}" name="roleid"
										id="roleid">${role.rolename}						
						</c:forEach>
							</div>
						</div>


						<br />
						<button class="btn btn-primary" onclick="userAddRole()"
							id="submit">确认</button>
					</form>

				</div>

			</div>
			<!-- /.modal-content -->
		</div>
	</div>



	<!--修改页面开始-->
	<div class="modal fade" id="myModal-update-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">修改</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="UpdateSyuser">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">用户名：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatenameid"
									name="name" style="width: 250px" maxlength="30"
									placeholder="10个汉字以内" />

							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">密码：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="password" id="updatepasswordid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">创建时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="createtime" id="updatecreatetimeid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">真实名字：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="realname" id="updaterealnameid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">电话：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="phone"
									id="updatephoneid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">头像：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="camera" id="updatecameraid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">生日：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="birthday" id="updatebirthdayid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">状态：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="state"
									id="updatestateid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">地址：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="address" id="updateaddressid" style="width: 250px"
									maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">部门id：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="bm"
									id="updatebmid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">邮箱：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="email"
									id="updateemailid" style="width: 250px" maxlength="30" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">职务：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control" name="zw"
									id="updatezwid" style="width: 250px" maxlength="30" /> <input
									type="hidden" class="form-control" id="updateid" name="id"
									style="width: 250px" maxlength="30" placeholder="10个汉字以内" />
							</div>
						</div>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="syuserupdata()">提交</button>
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>

</body>
</html>